package com.starblink.comment.adapter

import com.starblink.android.basic.adapter.BaseBindingVH
import com.starblink.android.basic.ext.click
import com.starblink.comment.bean.MoreCommentBean
import com.starblink.comment.databinding.ItemMoreCommentBinding

class CommentMoreHolder(binding: ItemMoreCommentBinding, val listener: (String, Int) -> Unit) :
    BaseBindingVH<MoreCommentBean, ItemMoreCommentBinding>(binding = binding) {

    override fun onBind(moreCommentBean: MoreCommentBean, position: Int) {
        binding.tvMore.text = "View ${moreCommentBean.secondCommentTotal} replies"
        binding.clPost.click {
            moreCommentBean.parentId?.let { it1 -> listener.invoke(it1, position) }
        }
    }
}